
#ifndef CQUEUE_H
#define CQUEUE_H

#include <string>
#include "customer.h"
#include <list>
#include <iostream>
#include <time.h>

using std::cout;
using std::endl;

class cqueue
{
	
	protected:		
		list<customer> line;

		int    processed;
		int    averageWait;
		int    longestWait;
		int    longestLength;
		string unluckyOne;
	
	public:
		cqueue();
		
		bool     empty();
		customer front();
		void     reset();
		int      size();

		int      getProcessed();
		int      getAWait();
		int      getLWait();
		int      getLLength();
		string   getUnlucky();
		void     display();		
};


class contest : public cqueue
{
	private:
		list<string>  entries;
		string        firstPlace;
		string        secondPlace;
	public:
		contest():cqueue(){;}
		
		string        getFirstPlace();
		string        getSecondPlace();
		list<string>* getEntries();
		void          inqueue(customer, int);
		void          dequeue(int);	
};

class deli : public cqueue
{
	public:
		deli():cqueue(){;}

		void inqueue(customer, int);
		void dequeue(int);
};

class shoppers : public cqueue
{
	public:
		shoppers():cqueue(){;}
		
		void inqueue(customer, int);
		void dequeue(int);
};

class checkout : public cqueue
{
	public:
		checkout():cqueue(){;}

		void inqueue(customer, int);
		void dequeue(int);
};

#include "cqueue.cpp"
#endif
